package com.mofeng.myshop.domain.dto.search;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mofeng.myshop.domain.dto.base.SearchBaseMp;
import com.mofeng.myshop.domain.po.Carmine;
import com.mofeng.myshop.until.MyUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
 * @author 作者
 * @since 2024-11-10
 */
@Schema(name = "Carmine 搜索类", description = "卡密 搜索类")
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class CarmineQo extends SearchBaseMp {
    @Schema(description = "金额")
    private String money;
    @Schema(description = "使用用户")
    private Long userId;
    @Schema(description = "是否使用  0没使用 1使用")
    private Integer used;


    public String getMoney() {
        return webNullHandle(this.money);
    }

    public Long getUserId() {
        return webNullHandle(this.userId);
    }

    public Integer getUsed() {
        if (MyUtil.StringUtil.isEmpty(this.used)) {
            return null;
        }
        return this.used;
    }

    public Page<Carmine> getPageMp() {
        return super.getPageMp(Carmine.class);
    }

}